cmake_minimum_required(VERSION 3.8)

set(module bevdet_tracker)

find_package(rclcpp REQUIRED)
find_package(interface REQUIRED)
find_package(Eigen3 REQUIRED)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_BUILD_TYPE "RELEASE")
set(CMAKE_CXX_FLAGS_RELEASE "-Wno-deprecated-declarations -O2")

include_directories(${EIGEN3_INCLUDE_DIRS}  ${OpenCV_INCLUDE_DIRS})

include(../../../common/cmake/add3rd.cmake)
add3rds(utils muduo)

file (GLOB src RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" tracker/*.cpp association/*.cpp *.cpp)

add_library(${module} ${src})
target_include_directories(${module} PUBLIC .)

target_link_libraries(${module} muduo_net muduo_base)
ament_target_dependencies(${module} rclcpp interface)

add_executable(bevdet_tracker_demo bevdet_tracker_demo.cc)
target_link_libraries(bevdet_tracker_demo ${module})